<header class="top-header">
    <div class="container">
        <nav class="navbar navbar-default">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">
                    <img src="{{ asset('statics/images/icon_logo_nav.png') }}" alt="logo">
                </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapse">
                <ul class="nav">
                    <li @if(request()->routeIs('enIndex')) class="on" @endif><a href="{{ route('enIndex') }}">Home</a></li>
                    <li @if(request()->routeIs('enTrade')) class="on" @endif><a href="{{ route('enTrade') }}">Trade</a></li>
                    <li><a href="{{ route('index') }}">中文</a>/<a href="{{ route('enIndex') }}">English</a></li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="wechat"></i></a>
                        <div class="dropdown-menu wechat-colde">
                            <img src="{{ asset('statics/images/icon_star_qrcode.jpg') }}" />
                        </div>
                    </li>
                    <li><a href="https://weibo.com/u/5804910556" target="_blank"><i class="weibo"></i></a></li>
                    @if(!Auth::check())
                        <li><a href="{{ route('login') }}"><i class="login"></i>Sign in</a></li>
                    @else
                        <li class="dropdown">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="{{ route('home') }}"><i class="login"></i>{{ str_limit(Auth::user()->name, 8, '...') }}</a>
                            <ul class="dropdown-menu personal">
                                <li><a href="{{ route('home') }}">Personal center</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Sign out</a></li>
                            </ul>
                            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                {{ csrf_field() }}
                            </form>
                        </li>
                    @endif
                </ul>
            </div>
        </nav>
    </div>
</header>